<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <h:head>
        <title>TODO supply a title</title>
        <meta name="viewport" content="width=device-width"/>
    </h:head>
    <h:body>
        <h:form>
            <h:panelGrid style="margin: 0 auto">
                <p:outputLabel value="CHEQUEO DE CONSISTENCIA" style="color: #2480BC;"/>
                <br></br>
                <br></br>
            </h:panelGrid>
            <h:panelGrid  columns="3">
                <h:outputText value="Por favor escoja un Esquema:"></h:outputText>
                <p:selectOneMenu value="#{consistenceCheckBean.schema}" style="width: 250px;" id="selecmenu">
                    <p:ajax listener="#{consistenceCheckBean.reloadTable()}" update="check"/>
                    <f:selectItem itemValue="" itemLabel=""/>
                    <f:selectItems value="#{consistenceCheckBean.schemas}" var="schema" itemLabel="#{schema}" itemValue="#{schema}"/>  
                </p:selectOneMenu>
                <br></br>
                <br></br>
            </h:panelGrid>
            <h:panelGrid columns="1" style="margin: 0 auto">
                <p:dataTable id="check" var="consistenceCheckResult" value="#{consistenceCheckBean.result}">  
                    <p:column headerText="TableName">  
                        <h:outputText value="#{consistenceCheckResult.tableName}" />  
                    </p:column>  

                    <p:column headerText="OP">  
                        <h:outputText value="#{consistenceCheckResult.op}" />  
                    </p:column>  

                    <p:column headerText="MsgType">  
                        <h:outputText value="#{consistenceCheckResult.msgType}" />  
                    </p:column>  

                    <p:column headerText="msgText">  
                        <h:outputText value="#{consistenceCheckResult.msgText}" />  
                    </p:column>  
                </p:dataTable>
            </h:panelGrid>
        </h:form>  
    </h:body>
</html>
